/******************************

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
#include <iomanip>

int* nhap(int &n){
	cout <<"\nnhap n: ";
	cin >>n;
	 int *a = new int[n];
	for(int i=0; i<n; i++){
		cout<<"\nNhap a["<<i<<"]: ";
		cin >>a[i];
	}
	return a;
}

void sxGiamDan(int *a, int n){
	for(int i =0; i<n-1; i++){
		for(int j =i+1; j<n; j++){
			if(a[j] > a[i]){
				int t  = a[j];
				a[j] = a[i];
				a[i] = t;
			}
		}
	}
}

void in(int *b, int n){
	cout<<"\nIn mang:\n";
	for(int i=0; i<n; i++){
		
		cout<<" "<<b[i];
	}
}
void main()
{
	int n =0, *b = NULL;
	b = nhap(n);
	in(b, n);
	sxGiamDan(b, n);
	in(b,n);
	getch();

}

/**********************************/